<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.goodsName" @on-enter="query" placeholder="商品名称"/>
                </i-col>
                <i-button @click="query">查询</i-button>
            </div>
            <div class="buttons-group">
                <i-col span="6">
                    <i-input v-model="retailPrice" @on-enter="setprice" placeholder="零售价格"/>
                </i-col>
                <i-col span="6">
                    <i-input v-model="marketPrice" @on-enter="setprice" placeholder="市场价格"/>
                </i-col>

                <i-button type="info" @click="setprice"><i class="fa fa-plus"></i>&nbsp;批量设置价格</i-button>
                <i-button type="warning" @click="add"><i class="fa fa-pencil-square-o"></i>&nbsp;选择规格</i-button>

            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="product" :rules="ruleValidate" :label-width="80">
            <!--<Form-item label="商品" prop="goodsId">
                <i-select v-model="product.goodsId" filterable @on-change="changeGoods" label-in-value>
                    <i-option v-for="goods in goodss" :value="goods.id" :key="goods.id">{{goods.name}}</i-option>
                </i-select>
            </Form-item>-->
            <Form-item v-if="type == 'add'" label="商品规格" prop="goodsSpecificationIds">
                <Checkbox-group v-model="attribute" >
                    <Checkbox :label="1" :disabled="attribute.length>1&&attribute.indexOf(1)<1" >颜色</Checkbox>
                    <Checkbox :label="2" :disabled="attribute.length>1&&attribute.indexOf(2)<1" >规格</Checkbox>
                    <Checkbox :label="4" :disabled="attribute.length>1&&attribute.indexOf(4)<1" >重量</Checkbox>
                    <Checkbox :label="5" :disabled="attribute.length>1&&attribute.indexOf(5)<1" >型号</Checkbox>
                    <Checkbox :label="6" :disabled="attribute.length>1&&attribute.indexOf(6)<1" >冷热</Checkbox>
                    <Checkbox :label="7" :disabled="attribute.length>1&&attribute.indexOf(7)<1" >外卖</Checkbox>
                    <Checkbox :label="8" :disabled="attribute.length>1&&attribute.indexOf(8)<1" >预留1</Checkbox>
                    <Checkbox :label="9" :disabled="attribute.length>1&&attribute.indexOf(9)<1" >预留2</Checkbox>
                    <Checkbox :label="10" :disabled="attribute.length>1&&attribute.indexOf(10)<1" >预留3</Checkbox>
                    <Checkbox :label="11" :disabled="attribute.length>1&&attribute.indexOf(11)<1" >预留4</Checkbox>
                    <Checkbox :label="12" :disabled="attribute.length>1&&attribute.indexOf(12)<1" >预留5</Checkbox>
                    <Checkbox :label="13" :disabled="attribute.length>1&&attribute.indexOf(13)<1" >预留6</Checkbox>
                    <Checkbox :label="14" :disabled="attribute.length>1&&attribute.indexOf(14)<1" >预留7</Checkbox>
                    <Checkbox :label="15" :disabled="attribute.length>1&&attribute.indexOf(15)<1" >预留8</Checkbox>
                    <Checkbox :label="16" :disabled="attribute.length>1&&attribute.indexOf(16)<1" >预留9</Checkbox>
                    <Checkbox :label="17" :disabled="attribute.length>1&&attribute.indexOf(17)<1" >预留10</Checkbox>
                </Checkbox-group>
            </Form-item>
            <Form-item  label="颜色" v-if="attribute.indexOf(1)>-1" prop="color">
                <i-select v-model="color" filterable multiple>
                    <i-option v-for="color in colors" :value="color.id" :key="color.id">{{color.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="规格" v-if="attribute.indexOf(2)>-1" prop="color">
                <i-select v-model="guige" filterable multiple>
                    <i-option v-for="guige in guiges" :value="guige.id" :key="guige.id">{{guige.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="重量" v-if="attribute.indexOf(4)>-1" prop="color">
                <i-select v-model="weight" filterable multiple>
                    <i-option v-for="weight in weights" :value="weight.id" :key="weight.id">{{weight.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="型号" v-if="attribute.indexOf(5)>-1" prop="color">
                <i-select v-model="size" filterable multiple>
                    <i-option v-for="size in sizes" :value="size.id" :key="size.id">{{size.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="冷热" v-if="attribute.indexOf(6)>-1" prop="color">
                <i-select v-model="bak" filterable multiple>
                    <i-option v-for="bak in baks" :value="bak.id" :key="bak.id">{{bak.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="外卖" v-if="attribute.indexOf(7)>-1" prop="color">
                <i-select v-model="bak0" filterable multiple>
                    <i-option v-for="bak0 in bak0s" :value="bak0.id" :key="bak0.id">{{bak0.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留1" v-if="attribute.indexOf(8)>-1" prop="color">
                <i-select v-model="bak1" filterable multiple>
                    <i-option v-for="bak1 in bak1s" :value="bak1.id" :key="bak1.id">{{bak1.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留2" v-if="attribute.indexOf(9)>-1" prop="color">
                <i-select v-model="bak2" filterable multiple>
                    <i-option v-for="bak2 in bak2s" :value="bak2.id" :key="bak2.id">{{bak2.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留3" v-if="attribute.indexOf(10)>-1" prop="color">
                <i-select v-model="bak3" filterable multiple>
                    <i-option v-for="bak3 in bak3s" :value="bak3.id" :key="bak3.id">{{bak3.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留4" v-if="attribute.indexOf(11)>-1" prop="color">
                <i-select v-model="bak4" filterable multiple>
                    <i-option v-for="bak4 in bak4s" :value="bak4.id" :key="bak4.id">{{bak4.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留5" v-if="attribute.indexOf(12)>-1" prop="color">
                <i-select v-model="bak5" filterable multiple>
                    <i-option v-for="bak5 in bak5s" :value="bak5.id" :key="bak5.id">{{bak5.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留6" v-if="attribute.indexOf(13)>-1" prop="color">
                <i-select v-model="bak6" filterable multiple>
                    <i-option v-for="bak6 in bak6s" :value="bak6.id" :key="bak6.id">{{bak6.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留7" v-if="attribute.indexOf(14)>-1" prop="color">
                <i-select v-model="bak7" filterable multiple>
                    <i-option v-for="bak7 in bak7s" :value="bak7.id" :key="bak7.id">{{bak7.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留8" v-if="attribute.indexOf(15)>-1" prop="color">
                <i-select v-model="bak8" filterable multiple>
                    <i-option v-for="bak8 in bak8s" :value="bak8.id" :key="bak8.id">{{bak8.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留9" v-if="attribute.indexOf(16)>-1" prop="color">
                <i-select v-model="bak9" filterable multiple>
                    <i-option v-for="bak9 in bak9s" :value="bak9.id" :key="bak9.id">{{bak9.value}}</i-option>
                </i-select>
            </Form-item>
            <Form-item  label="预留10" v-if="attribute.indexOf(17)>-1" prop="color">
                <i-select v-model="bak10" filterable multiple>
                    <i-option v-for="bak10 in bak10s" :value="bak10.id" :key="bak10.id">{{bak10.value}}</i-option>
                </i-select>
            </Form-item>
            <!-- <Form-item label="商品序列号" prop="goodsSn">
                <i-input v-model="product.goodsSn" placeholder="商品序列号"/>
            </Form-item>
           <Form-item label="商品库存" prop="goodsNumber">
                <Input-number :min="0" :step="1" v-model="product.goodsNumber" placeholder="商品库存"
                              style="width: 188px;"/>
            </Form-item>-->
            <Form-item label="零售价格" prop="retailPrice">
                <Input-number :min="0" :step="1" v-model="product.retailPrice" placeholder="零售价格"
                              style="width: 188px;"/>
            </Form-item>
            <Form-item label="市场价格" prop="marketPrice">
                <Input-number :min="0" :step="1" v-model="product.marketPrice" placeholder="市场价格"
                              style="width: 188px;"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/shop/productselect.js?_${date.systemTime}"></script>
</body>
</html>